home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
dbms_mag
/
9107
/
paradox1
< prev
next >
Wrap
Text File
|
1991-05-25
|
2KB
|
62 lines
LISTING 1. A Ring Menu Proc
1 ; ---------------------------------------------------------------------------
2 ; Traditional Paradox style menu
3 ; DBMS - Speaking of PAL - July, 1991 - Listing 1
4 ;
5 ; This procedure displays a Paradox style menu and allows
6 ; the user to select a menu choice.
7 ; ----------------------------------------------------------------
8 proc HORIZONTAL_MENU()
9 private PROCNAME,
1 MENU.CHOICE ; user selection from the menu
11
12 ; set default for 1st time through
13
14 MENU.CHOICE = "Enter"
15 while (true)
16
17 ; display menu and highlight default from the last time around
18
19 showmenu
20 "Enter" : "Enter new customers",
21 "Update" : "Update customer order volumes",
22 "Process" : "Process outstanding invoices",
23 "Reports" : "Generate summary reports",
24 "Archive" : "Archive old customers",
25 "Graph" : "Graph customer credit information"
26 default MENU.CHOICE
27 to MENU.CHOICE
28
29 ; process user selection from the menu
30
31 switch
32 case MENU.CHOICE = "Enter" :
33 ENTER_CUSTOMERS()
34
35 case MENU.CHOICE = "Update" :
36 UPDATE_CUST_ORDERS()
37
38 case MENU.CHOICE = "Process" :
39 PROCESS_INVOICES()
40
41 case MENU.CHOICE = "Reports" :
42 SUMMARY_REPORTS()
43
44 case MENU.CHOICE = "Archive" :
45 ARCHIVE_CUSTOMERS()
46
47 case MENU.CHOICE = "Graph" :
48 GRAPH_CUST_CREDIT()
49
50 case MENU.CHOICE = "Esc" :
51 return
52
53 endswitch
54
55 endwhile
56
57 endproc
58
59 HORIZONTAL_MENU()